import { defineStore } from 'pinia';

export interface HeaderInfoState {
  title: string;
}

const defaultHeaderInfo = {
  title: '',
};

export const useHeaderStore = defineStore({
  id: 'headerStore',
  state: (): HeaderInfoState => ({
    title: defaultHeaderInfo.title,
  }),
  actions: {
    setDatasourceInfo(payload: HeaderInfoState) {
      this.title = payload.title;
    },
  },
});
